
public class MovementPacket {

	private float direction;
	private boolean will;
	private Player.Speeds speed;
	private int i;
	public final static int LIMIT = 5;
	
	/**
	 * sets this objects instance variables. Nothing fancy
	 * @param will whether or not this movement is of the players free will
	 * @param direction the direction of the movement
	 * @param speed the speed of the movement
	 */
	public MovementPacket(boolean will,float direction,Player.Speeds speed)
	{
		this.direction = direction;
		this.will = will;
		this.speed = speed;
		this.i = 0;
	}
	/**
	 * gets the direction
	 * @return direction
	 */
	public float getDirection()
	{
		return direction;
	}
	/**
	 * gets whether or not the movement is voluntary
	 * @return will
	 */
	public boolean getWill()
	{
		return will;
	}
	/**
	 * gets the speed of the movement
	 * @return speed
	 */
	public Player.Speeds getSpeed()
	{
		return speed;
	}
	public void add()
	{
		if(i >LIMIT)
		{
			will = true;
		}
		i++;
	}
}
